package com.spring;

import com.spring.config.AppConfig;
import com.spring.service.UserInterface;
import com.spring.service.UserService;
import com.spring.beans.HscApplicationContext;

/**
 * 简单模拟spring底层原理
 */
public class Main {
    public static void main(String[] args) {

        HscApplicationContext hscApplicationContext = new HscApplicationContext(AppConfig.class);
        //根据beanName，获取对应的对象
        UserInterface userService = (UserInterface) hscApplicationContext.getBean("userService");
        userService.test();
    }
}